package com.itheima.exception;

import com.itheima.common.CommonResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GobalExceptionHandler {
    @ExceptionHandler(TokenException.class)
    public CommonResult tokenHandle(){
        return CommonResult.error("token失效");
    }

}
